// GUI/ExtractGUI.h

#ifndef __EXTRACT_GUI_H
#define __EXTRACT_GUI_H

#include "Common/Archive/Extract.h"

#include "../FileManager/ExtractCallback.h"

#include <vector>

#include <memory>
#include "Common/System/Threading/SimpleWorkerPool.h"

/*
  RESULT can be S_OK, even if there are errors!!!
  if RESULT == S_OK, check extractCallback->IsOK() after ExtractGUI().

  RESULT = E_ABORT - user break.
  RESULT != E_ABORT:
  {
   messageWasDisplayed = true  - message was displayed already.
   messageWasDisplayed = false - there was some internal error, so you must show error message.
  }
*/

HRESULT ExtractGUI(
    Common::Archive::CCodecs *codecs,
    const std::vector<int> &formatIndices,
    std::vector<CString> &archivePaths,
    std::vector<CString> &archivePathsFull,
    const Common::FileSystem::Wildcard::CCensorNode * const wildcardCensor,
    Common::Archive::CExtractOptions &options,
    bool showDialog,
    bool &messageWasDisplayed,
    CExtractCallbackImp *extractCallback,
	std::shared_ptr<Common::System::Threading::CSimpleWorkerPool> * pool,
    HWND hwndParent = NULL);

#endif
